package com.champ.mc.tusmvc.common.dto.oauth2;

import lombok.Data;

@Data
public class UserGrade implements Comparable<UserGrade>{
    /**
     *  等级编码,用于查询等
     */
    private String code;

    /**
     *  显示等级名称
     */
    private String title;

    /**
     *  显示等级的图标
     */
    private String icon;

    /**
     *  达到当前等级所需经验值
     */
    private double thresholdExpPoints;

    /**
     *  下个等级所需经验值
     */
    private String nextGradeExpPoints;

    /**
     * 该等级兑换积分权重系数
     */
    private double creditRatio;

    /**
     *  该等级兑换经验值权重系数
     */
    private double pointRatio;

    /**
     *  等级排序字段, 数字越小,等级越高
     */
    private int levelOrder;
    @Override
    public int compareTo(UserGrade o) {
        return o.getLevelOrder() - this.getLevelOrder();
    }
}
